package cn.springcloud.alibaba.sys.controller.v1;

import cn.springcloud.alibaba.core.base.Result;
import cn.springcloud.alibaba.sys.dto.SysUserDTO;
import cn.springcloud.alibaba.sys.service.SysUserDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/sys-user")
public class SysUserController {

	@Autowired
	private SysUserDetailsService sysUserDetailsService;

	@GetMapping("/getSysUserByUserName")
	public Result<SysUserDTO> getSysUserByUserName(String username) {
		return sysUserDetailsService.getSysUserByUserName(username);
	}
}
